package com.example.clientdemo.controller;

import com.example.clientdemo.pojo.City;
import com.example.clientdemo.service.WeatherService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
public class WeatherController {

    @Resource
    private WeatherService weatherService;

    /**
     * 获得国外国家名称和与之对应的ID
     */
    public List<String> getRegionCountry() {
        return weatherService.getRegionCountry();
    }

    /**
     * 获得支持的城市/地区名称和与之对应的ID
     */
    public List<City> getSupportCityDataset(String regionCode) {
        return weatherService.getSupportCityDataset(regionCode);
    }

}
